<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProjectsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('projects', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('pid');                  //pid 和user_personnels表关联
            $table->integer('uid');                  //用户id
            $table->string('project_name', 50);     //项目名称
            $table->string('start_time', 20);  //开始时间
            $table->string('over_time', 20);   //结束时间
            $table->string('corporation', 50)->nullable();     //公司名称
            $table->string('duty', 50)->nullable();     //项目职务
            $table->string('project_description', 1000)->nullable();     //项目描述
            $table->string('project_role', 1000)->nullable();     //项目职责
            $table->string('project_performance', 1000)->nullable();     //项目业绩
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('projects');
    }
}
